<template>
  <view class="Water">
    <mineNavbar :styleData="styleData" />

    <scroll-view class="scroll" scroll-y>
      <view class="logo">
        <image class="" src="../../../../static/images/aboutUs/bgLogo.png" mode="aspectFit|aspectFill|widthFix"
          lazy-load="false" binderror="" bindload="" />

        <view class="desc"> 零工就业招聘驿站 </view>
      </view>

      <view :class="{ 'c-item': true, write: isLastItem(index) }" v-for="(item, index) in items" :key="index"
        @click="toPath(item.path)">
        <text class="text"> {{ item.text }}</text>
        <image :src="item.imageSrc" mode="aspectFit|aspectFill|widthFix" lazy-load="false" />


      </view>
    </scroll-view>
  </view>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      styleData: {
        show: true,
        tabbarText: "关于我们",
      },

      items: [
        {
          text: "服务协议",
          imageSrc:
            "../../../../static/images/emterpriseMineImg/arrow-right.png",
          path: "subPage/enterprise/mine/details/userAgreement?type=1",
        },
        {
          text: "隐私协议",
          imageSrc:
            "../../../../static/images/emterpriseMineImg/arrow-right.png",
          path: "subPage/enterprise/mine/details/privacy?type=1",
        },
        {
          text: "账号注销",
          imageSrc:
            "../../../../static/images/emterpriseMineImg/arrow-right.png",
          path: "pages/recruit/mine/loginOut/index",
        },
      ],
    };
  },
  computed: {},
  // 监控data中的数据变化
  watch: {},
  onLoad(options) { },
  onShow() { },
  onReady() { },
  methods: {
    toPath(path) {
      if (path === "") return;

      uni.navigateTo({
        url: `/${path}`,
      });
    },
    isLastItem(index) {
      return index === this.items.length - 1;
    },
  },
};
</script>
<style lang="scss" scoped>
.Water {
  height: 100vh;
  width: 100%;
  background-color: #f9f9f9;

  .scroll {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24rpx;

    .logo {
      width: 188rpx;
      height: 188rpx;
      margin: 110rpx auto;

      image {
        width: 100%;
        height: 100%;
      }

      .desc {
        font-weight: 500;
        font-size: 24rpx;
        color: #00000073;
        letter-spacing: 0;
        text-align: center;
      }
    }

    .c-item {
      display: flex;
      align-items: center;
      justify-content: space-between;

      width: 702rpx;
      height: 98rpx;
      background: #ffffff;
      margin-bottom: 8rpx;

      .text {
        margin-left: 24rpx;
        font-weight: 600;
        font-size: 28rpx;
        color: #000000;
      }

      image {
        width: 40rpx;
        height: 40rpx;
        margin-right: 24rpx;
      }
    }

    .write {
      margin-top: 41rpx;
    }
  }
}
</style>
